package com.orm.config;

import org.springframework.jdbc.core.JdbcTemplate;

public class JdbcCache {
    private static JdbcTemplate jdbcTemplate;

    private JdbcCache() {}

    public static synchronized void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
        if (JdbcCache.jdbcTemplate == null) {
            JdbcCache.jdbcTemplate = jdbcTemplate;
        }
    }

    public static synchronized JdbcTemplate getJdbcTemplate() {
        return jdbcTemplate;
    }
}